package com.wedjg.concurrency.example.singleton;

import com.wedjg.concurrency.annotations.ThreadSafe;

/**
 * 饿汉式单例
 * 安全发布对象
 * @author wedjg
 * @version 1.0
 * @date 2019/6/2
 */
@ThreadSafe
public class SingletonExample2 {

    private static SingletonExample2 instance = new SingletonExample2();

    private SingletonExample2() {
    }

    public static SingletonExample2 getInstance() {
        return instance;
    }
}
